﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WatsonComputers.Utility.Log
{
    /// <summary>
    /// Defines the interface for a log writer.
    /// </summary>
    public interface ILogWriter
    {
        #region Methods

        /// <summary>
        /// Writes an entry to the log.
        /// </summary>
        /// <param name="text">
        /// The text of the entry to write.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="text"/> was null.
        /// </exception>
        void Write(string text);
        
        /// <summary>
        /// Writes an error level entry to the log using information from a 
        /// specified exception.
        /// </summary>
        /// <param name="exception">
        /// The exception containing the details for the log entry.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="exception"/> was null.
        /// </exception>
        void Write(Exception exception);

        /// <summary>
        /// Writes an entry to the log with the specified log level.
        /// </summary>
        /// <param name="level">
        /// The level of the log entry to write.
        /// </param>
        /// <param name="text">
        /// The text of the entry to write.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="text"/> was null.
        /// </exception>
        void Write(LogLevel level, string text);

        /// <summary>
        /// Writes an entry to the log with the specified log level using 
        /// information from a specified exception.
        /// </summary>
        /// <param name="level">
        /// The level of the log entry to write.
        /// </param>
        /// <param name="exception">
        /// The exception containing the details for the log entry.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="exception"/> was null.
        /// </exception>
        void Write(LogLevel level, Exception exception);

        /// <summary>
        /// Writes a debug level entry to the log.
        /// </summary>
        /// <param name="text">
        /// The text of the entry to write.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="text"/> was null.
        /// </exception>
        void WriteDebug(string text);

        /// <summary>
        /// Writes an error level entry to the log.
        /// </summary>
        /// <param name="text">
        /// The text of the entry to write.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="text"/> was null.
        /// </exception>
        void WriteError(string text);

        /// <summary>
        /// Writes an information level entry to the log.
        /// </summary>
        /// <param name="text">
        /// The text of the entry to write.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="text"/> was null.
        /// </exception>
        void WriteInformation(string text);

        /// <summary>
        /// Writes a warning level entry to the log.
        /// </summary>
        /// <param name="text">
        /// The text of the entry to write.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="text"/> was null.
        /// </exception>
        void WriteWarning(string text);

        #endregion
    }
}
